<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkEntryBuffer</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="NumericEntry.html" title="Numeric/Text Data Entry">
<link rel="prev" href="GtkEntry.html" title="GtkEntry">
<link rel="next" href="GtkEntryCompletion.html" title="GtkEntryCompletion">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="NumericEntry.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
<td><a accesskey="n" href="GtkEntryCompletion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkEntryBuffer.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GtkEntryBuffer.description" class="shortcut">Description</a>
                   | 
                  <a href="#GtkEntryBuffer.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GtkEntryBuffer.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#GtkEntryBuffer.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GtkEntryBuffer"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkEntryBuffer.top_of_page"></a>GtkEntryBuffer</span></h2>
<p>GtkEntryBuffer — Text buffer for GtkEntry</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkEntryBuffer.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-struct" title="struct GtkEntryBuffer">GtkEntryBuffer</a>;
<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="returnvalue">GtkEntryBuffer</span></a> *    <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-new" title="gtk_entry_buffer_new ()">gtk_entry_buffer_new</a>                (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *initial_chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_initial_chars</code></em>);
const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-text" title="gtk_entry_buffer_get_text ()">gtk_entry_buffer_get_text</a>           (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-text" title="gtk_entry_buffer_set_text ()">gtk_entry_buffer_set_text</a>           (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-bytes" title="gtk_entry_buffer_get_bytes ()">gtk_entry_buffer_get_bytes</a>          (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-length" title="gtk_entry_buffer_get_length ()">gtk_entry_buffer_get_length</a>         (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-max-length" title="gtk_entry_buffer_get_max_length ()">gtk_entry_buffer_get_max_length</a>     (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-max-length" title="gtk_entry_buffer_set_max_length ()">gtk_entry_buffer_set_max_length</a>     (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> max_length</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-insert-text" title="gtk_entry_buffer_insert_text ()">gtk_entry_buffer_insert_text</a>        (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-delete-text" title="gtk_entry_buffer_delete_text ()">gtk_entry_buffer_delete_text</a>        (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-emit-deleted-text" title="gtk_entry_buffer_emit_deleted_text ()">gtk_entry_buffer_emit_deleted_text</a>  (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_chars</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-emit-inserted-text" title="gtk_entry_buffer_emit_inserted_text ()">gtk_entry_buffer_emit_inserted_text</a> (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_chars</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----GtkEntryBuffer
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--length" title='The "length" property'>length</a>"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read
  "<a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--max-length" title='The "max-length" property'>max-length</a>"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write
  "<a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer--text" title='The "text" property'>text</a>"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-deleted-text" title='The "deleted-text" signal'>deleted-text</a>"                                   : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="GtkEntryBuffer.html#GtkEntryBuffer-inserted-text" title='The "inserted-text" signal'>inserted-text</a>"                                  : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.description"></a><h2>Description</h2>
<p>
The <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> class contains the actual text displayed in a
<a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> widget.
</p>
<p>
A single <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> object can be shared by multiple <a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a>
widgets which will then share the same text content, but not the cursor
position, visibility attributes, icon etc.
</p>
<p>
<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> may be derived from. Such a derived class might allow
text to be stored in an alternate location, such as non-pageable memory,
useful in the case of important passwords. Or a derived class could 
integrate with an application's concept of undo/redo.
</p>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkEntryBuffer-struct"></a><h3>struct GtkEntryBuffer</h3>
<pre class="programlisting">struct GtkEntryBuffer;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-new"></a><h3>gtk_entry_buffer_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="returnvalue">GtkEntryBuffer</span></a> *    gtk_entry_buffer_new                (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *initial_chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_initial_chars</code></em>);</pre>
<p>
Create a new GtkEntryBuffer object.
</p>
<p>
Optionally, specify initial text to set in the buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>initial_chars</code></em> :</span></p></td>
<td>initial buffer text, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_initial_chars</code></em> :</span></p></td>
<td>number of characters in <em class="parameter"><code>initial_chars</code></em>, or -1</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A new GtkEntryBuffer object.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-text"></a><h3>gtk_entry_buffer_get_text ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *       gtk_entry_buffer_get_text           (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>
Retrieves the contents of the buffer.
</p>
<p>
The memory pointer returned by this call will not change
unless this object emits a signal, or is finalized.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a pointer to the contents of the widget as a
string. This string points to internally allocated
storage in the buffer and must not be freed, modified or
stored.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-set-text"></a><h3>gtk_entry_buffer_set_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_entry_buffer_set_text           (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);</pre>
<p>
Sets the text in the buffer.
</p>
<p>
This is roughly equivalent to calling <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-delete-text" title="gtk_entry_buffer_delete_text ()"><code class="function">gtk_entry_buffer_delete_text()</code></a>
and <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-insert-text" title="gtk_entry_buffer_insert_text ()"><code class="function">gtk_entry_buffer_insert_text()</code></a>.
</p>
<p>
Note that <em class="parameter"><code>n_chars</code></em> is in characters, not in bytes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chars</code></em> :</span></p></td>
<td>the new text</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>the number of characters in <em class="parameter"><code>text</code></em>, or -1</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-bytes"></a><h3>gtk_entry_buffer_get_bytes ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="returnvalue">gsize</span></a>               gtk_entry_buffer_get_bytes          (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>
Retrieves the length in bytes of the buffer.
See <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-get-length" title="gtk_entry_buffer_get_length ()"><code class="function">gtk_entry_buffer_get_length()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The byte length of the buffer.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-length"></a><h3>gtk_entry_buffer_get_length ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_entry_buffer_get_length         (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>
Retrieves the length in characters of the buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of characters in the buffer.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-get-max-length"></a><h3>gtk_entry_buffer_get_max_length ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>                gtk_entry_buffer_get_max_length     (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>);</pre>
<p>
Retrieves the maximum allowed length of the text in
<em class="parameter"><code>buffer</code></em>. See <a class="link" href="GtkEntryBuffer.html#gtk-entry-buffer-set-max-length" title="gtk_entry_buffer_set_max_length ()"><code class="function">gtk_entry_buffer_set_max_length()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the maximum allowed number of characters
in <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>, or 0 if there is no maximum.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-set-max-length"></a><h3>gtk_entry_buffer_set_max_length ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_entry_buffer_set_max_length     (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> max_length</code></em>);</pre>
<p>
Sets the maximum allowed length of the contents of the buffer. If
the current contents are longer than the given length, then they
will be truncated to fit.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>max_length</code></em> :</span></p></td>
<td>the maximum length of the entry buffer, or 0 for no maximum.
(other than the maximum length of entries.) The value passed in will
be clamped to the range 0-65536.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-insert-text"></a><h3>gtk_entry_buffer_insert_text ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_entry_buffer_insert_text        (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);</pre>
<p>
Inserts <em class="parameter"><code>n_chars</code></em> characters of <em class="parameter"><code>chars</code></em> into the contents of the
buffer, at position <em class="parameter"><code>position</code></em>.
</p>
<p>
If <em class="parameter"><code>n_chars</code></em> is negative, then characters from chars will be inserted
until a null-terminator is found. If <em class="parameter"><code>position</code></em> or <em class="parameter"><code>n_chars</code></em> are out of
bounds, or the maximum buffer text length is exceeded, then they are
coerced to sane values.
</p>
<p>
Note that the position and length are in characters, not in bytes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>the position at which to insert text.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chars</code></em> :</span></p></td>
<td>the text to insert into the buffer.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>the length of the text in characters, or -1</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of characters actually inserted.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-delete-text"></a><h3>gtk_entry_buffer_delete_text ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               gtk_entry_buffer_delete_text        (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> n_chars</code></em>);</pre>
<p>
Deletes a sequence of characters from the buffer. <em class="parameter"><code>n_chars</code></em> characters are
deleted starting at <em class="parameter"><code>position</code></em>. If <em class="parameter"><code>n_chars</code></em> is negative, then all characters
until the end of the text are deleted.
</p>
<p>
If <em class="parameter"><code>position</code></em> or <em class="parameter"><code>n_chars</code></em> are out of bounds, then they are coerced to sane
values.
</p>
<p>
Note that the positions are specified in characters, not bytes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>position at which to delete text</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>number of characters to delete</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The number of characters deleted.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-emit-deleted-text"></a><h3>gtk_entry_buffer_emit_deleted_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_entry_buffer_emit_deleted_text  (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_chars</code></em>);</pre>
<p>
Used when subclassing <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>position at which text was deleted</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>number of characters deleted</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-buffer-emit-inserted-text"></a><h3>gtk_entry_buffer_emit_inserted_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_entry_buffer_emit_inserted_text (<em class="parameter"><code><a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> position</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *chars</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_chars</code></em>);</pre>
<p>
Used when subclassing <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>position at which text was inserted</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chars</code></em> :</span></p></td>
<td>text that was inserted</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>number of characters inserted</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkEntryBuffer--length"></a><h3>The <code class="literal">"length"</code> property</h3>
<pre class="programlisting">  "length"                   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>                 : Read</pre>
<p>
The length (in characters) of the text in buffer.
</p>
<p>Allowed values: &lt;= 65535</p>
<p>Default value: 0</p>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer--max-length"></a><h3>The <code class="literal">"max-length"</code> property</h3>
<pre class="programlisting">  "max-length"               <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a>                  : Read / Write</pre>
<p>
The maximum length (in characters) of the text in the buffer.
</p>
<p>Allowed values: [0,65535]</p>
<p>Default value: 0</p>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer--text"></a><h3>The <code class="literal">"text"</code> property</h3>
<pre class="programlisting">  "text"                     <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write</pre>
<p>
The contents of the buffer.
</p>
<p>Default value: ""</p>
<p class="since">Since 2.18</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryBuffer.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkEntryBuffer-deleted-text"></a><h3>The <code class="literal">"deleted-text"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>           position,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>           n_chars,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>        user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
This signal is emitted after text is deleted from the buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>the position the text was deleted at.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>The number of characters that were deleted.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryBuffer-inserted-text"></a><h3>The <code class="literal">"inserted-text"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a> *buffer,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>           position,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>          *chars,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a>           n_chars,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>        user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
This signal is emitted after text is inserted into the buffer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>a <a class="link" href="GtkEntryBuffer.html" title="GtkEntryBuffer"><span class="type">GtkEntryBuffer</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
<td>the position the text was inserted at.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>chars</code></em> :</span></p></td>
<td>The text that was inserted.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_chars</code></em> :</span></p></td>
<td>The number of characters that were inserted.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.18</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>